<style type="text/css">

</style>
<div class="container-fluid" ng-controller="ingredientList" style="position:relative">
    <% include public/modal %>
    <!-- Page Heading -->
    <div class="row">
        <div class="col-lg-12">
            <ol class="breadcrumb" style="position:relative;margin-top:5px;margin-bottom:20px;">
                <li>
                    <i class="fa fa-cube"></i> 菜单管理
                </li>
                <li class="active">材料管理
                </li>


                <div style="position:absolute;right:2%;top:23%;cursor:pointer;">
                    <i class="fa fa-plus-circle fa-lg" ng-click="mdfFun()"></i>
                </div>

            </ol>
            <% include public/tableTool %>

            <div class="pull-right">
                <% include public/searchBox %>
            </div>


        </div>
    </div>
    <div class="row" style="margin-top:10px;">
        <div class="col-lg-12">
            <div class="table-responsive">
                <table class="table table-hover table-striped">
                    <thead>
                    <tr>
                        <th style="width:10%"h><input type="checkbox" class="mini" id="selectAll"/></th>
                        <th>类型</th>
                        <th>名称</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="content in data" class="datalist">
                        <td><input type="checkbox" name="listItem" class="mini" value="{{content._id}}" ng-click="getNewIds()"/></td>
                        <td>{{ingredienttypes[content.type]}}
                        </td>
                        <td> {{content.name}}</td>
                        <td>
                            <i class="fa fa-edit"
                               ng-click="mdfFun(content._id)"
                               style="cursor:pointer;"></i>&nbsp;
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <% include public/tableFooter %>
        </div>
    </div>

    <!--提示确认模态窗口-->
    <div class="modal fade bs-example-modal-sm" id="mdfIngrendient" style="background-color: #ebebeb">
        <div class="modal-dialog modal-sm" style="width:100%">
            <form method="post" ng-submit="processForm(true)" name="myForm">
                <div class="panel-body">
                    <div class="row">
                        <div class="col-lg-12">
                            <form role="form">
                                <label>材料类型</label>
                                <div class="form-group input-group" style="width: 100%;">
                                    <select class="form-control" name="ingredientType" id="ingredientType">
                                        <% ingredientTypes.forEach(function(ingredientType, index) { %>
                                        <option value="<%= index %>" ><%=ingredientType %></option>
                                        <% })%>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label>材料名称</label>
                                    <input class="form-control" name="ingredientName" id="ingredientName" ng-minlength="5" ng-maxlength="50" ng-model="formData.name" required>
                                </div>
                                <div class="form-group">
                                    <label>价格</label>
                                    <input class="form-control" name="ingredientPrice" id="ingredientPrice" ng-minlength="5" ng-maxlength="50" ng-model="formData.price" required>
                                </div>

                                <div align="right">
                                    <button type="submit" class="btn btn-default">保存</button>
                                    <button type="button" class="btn btn-default"  data-dismiss="modal">返回</button>
                                </div>
                            </form>
                        </div>

                    </div>
                    <!-- /.row (nested) -->
                </div>
            </form>
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->


</div>



